package jpa.entitys.promis.construction;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the PAYMENT_REQUEST_OUTGOING database table.
 * 
 */
@Entity
@Table(name="PAYMENT_REQUEST_OUTGOING")
@NamedQueries({
    @NamedQuery(name = "PaymentRequestOutgoing.findAll", query = " SELECT c FROM PaymentRequestOutgoing c "),
    @NamedQuery(name = "PaymentRequestOutgoing.findById", query = " SELECT c FROM PaymentRequestOutgoing c WHERE c.id = :Id "),
    @NamedQuery(name = "PaymentRequestOutgoing.findBySapPoNo", query = " SELECT c FROM PaymentRequestOutgoing c WHERE c.id.syncExternalRefNo = :syncExternalRefNo And c.status = :status "),
    @NamedQuery(name = "PaymentRequestOutgoing.findByStaging", query = " SELECT c FROM PaymentRequestOutgoing c WHERE c.syncIsstaging = :syncIsstaging"),
    @NamedQuery(name = "PaymentRequestOutgoing.findByPB", query = " SELECT c FROM PaymentRequestOutgoing c WHERE c.id.company = :company And c.id.project = :project And c.id.requestType = :requestType  And c.id.requestNo = :requestNo And c.id.requestSeries = :requestSeries And c.id.seq = :seq And c.id.seqNo = :seqNo And c.id.syncExternalRefNo = :syncExternalRefNo And c.status = :status order by c.id.company,c.id.project,c.id.requestType,c.id.requestSeries,c.id.requestNo,c.id.seq,c.id.seqNo asc")
})
public class PaymentRequestOutgoing extends jpa.entitys.common.CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private PaymentRequestOutgoingPK id;

	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}
	
	@Column(name="BUILDING_PHASE", length=30)
	private String buildingPhase;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CHEQUE_DATE")
	private Date chequeDate;

	@Column(name="CREATED_BY")
	private String createdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Column(name="INSTALLMENT_NUMBER", precision=16, scale=2)
	private BigDecimal installmentNumber;

	@Column(name="LAST_UPD_BY")
	private String lastUpdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="PAYMENT_AMOUNT", precision=16, scale=2)
	private BigDecimal paymentAmount;

	@Column(name="REF_NO", precision=6)
	private Long refNo;

	@Column(name="REF_SEQ")
	private Long refSeq;

	@Column(name="REF_SERIES", length=4)
	private String refSeries;

	@Column(name="REF_TYPE", length=2)
	private String refType;

	@Column(length=1)
	private String status;

	@Column(name="SYNC_CREATEDBY", length=100)
	private String syncCreatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_EXTERNAL_REF_KEY", length=100)
	private String syncExternalRefKey;	

	@Column(name="SYNC_ISSTAGING", length=1)
	private String syncIsstaging;

	@Column(name="SYNC_ISSYNC", length=1)
	private String syncIssync;

	@Column(name="SYNC_UPDATEDBY", length=100)
	private String syncUpdatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(name="UNIT_NUMBER", length=30)
	private String unitNumber;

	@Column(name="ZONE_CODE", length=30)
	private String zoneCode;
	
	@Temporal( TemporalType.TIMESTAMP)
	@Column(name="PAYMENT_DATE")
	private Date paymentDate;
	
	@Column(name="IS_INTERFACE")
	private String isInterface;
	
	@Column(name="PROMIS_STAGING_ID")
	private String promisStagingId;
	
	@Column(name="INSTALLMENT_SEQ")
	private BigDecimal installmentSeq;
	
	@Column(name="LINE_INST_KEY")
	private String lineInstKey;
 
	/**
	 * @return the lineInstKey
	 */
	public String getLineInstKey() {
		return lineInstKey;
	}

	/**
	 * @param lineInstKey the lineInstKey to set
	 */
	public void setLineInstKey(String lineInstKey) {
		this.lineInstKey = lineInstKey;
	}

	/**
	 * @return the installmentSeq
	 */
	public BigDecimal getInstallmentSeq() {
		return installmentSeq;
	}

	/**
	 * @param installmentSeq the installmentSeq to set
	 */
	public void setInstallmentSeq(BigDecimal installmentSeq) {
		this.installmentSeq = installmentSeq;
	}

	public String getIsInterface() {
		return isInterface;
	}
	
	public void setIsInterface(String isInterface) {
		this.isInterface = isInterface;
	}

	
	/**
	 * @return the promisStagingId
	 */
	public String getPromisStagingId() {
		return promisStagingId;
	}

	/**
	 * @param promisStagingId the promisStagingId to set
	 */
	public void setPromisStagingId(String promisStagingId) {
		this.promisStagingId = promisStagingId;
	}

	/**
	 * @return the paymentDate
	 */
	public Date getPaymentDate() {
		return paymentDate;
	}

	/**
	 * @param paymentDate the paymentDate to set
	 */
	public void setPaymentDate(Date paymentDate) {
		this.paymentDate = paymentDate;
	}

	public PaymentRequestOutgoing() {
    }

	public PaymentRequestOutgoingPK getId() {
		return this.id;
	}

	public void setId(PaymentRequestOutgoingPK id) {
		this.id = id;
	}
	
	public String getBuildingPhase() {
		return this.buildingPhase;
	}

	public void setBuildingPhase(String buildingPhase) {
		this.buildingPhase = buildingPhase;
	}

	public Date getChequeDate() {
		return this.chequeDate;
	}

	public void setChequeDate(Date chequeDate) {
		this.chequeDate = chequeDate;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public BigDecimal getInstallmentNumber() {
		return this.installmentNumber;
	}

	public void setInstallmentNumber(BigDecimal installmentNumber) {
		this.installmentNumber = installmentNumber;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public BigDecimal getPaymentAmount() {
		return this.paymentAmount;
	}

	public void setPaymentAmount(BigDecimal paymentAmount) {
		this.paymentAmount = paymentAmount;
	}

	public Long getRefNo() {
		return this.refNo;
	}

	public void setRefNo(Long refNo) {
		this.refNo = refNo;
	}

	public Long getRefSeq() {
		return this.refSeq;
	}

	public void setRefSeq(Long refSeq) {
		this.refSeq = refSeq;
	}

	public String getRefSeries() {
		return this.refSeries;
	}

	public void setRefSeries(String refSeries) {
		this.refSeries = refSeries;
	}

	public String getRefType() {
		return this.refType;
	}

	public void setRefType(String refType) {
		this.refType = refType;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncExternalRefKey() {
		return this.syncExternalRefKey;
	}

	public void setSyncExternalRefKey(String syncExternalRefKey) {
		this.syncExternalRefKey = syncExternalRefKey;
	}



	public String getSyncIsstaging() {
		return this.syncIsstaging;
	}

	public void setSyncIsstaging(String syncIsstaging) {
		this.syncIsstaging = syncIsstaging;
	}

	public String getSyncIssync() {
		return this.syncIssync;
	}

	public void setSyncIssync(String syncIssync) {
		this.syncIssync = syncIssync;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public String getUnitNumber() {
		return this.unitNumber;
	}

	public void setUnitNumber(String unitNumber) {
		this.unitNumber = unitNumber;
	}

	public String getZoneCode() {
		return this.zoneCode;
	}

	public void setZoneCode(String zoneCode) {
		this.zoneCode = zoneCode;
	}

}